package com.greet.mapper;

import com.greet.annotation.AutoFill;
import com.greet.dto.SetmealPageQueryDTO;
import com.greet.entity.Setmeal;
import com.greet.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealMapper {

    public List<Setmeal> select(Setmeal setmeal);

    @Select("select count(0) from setmeal")
    long countAll();

    List<Setmeal> selectPageQuery(SetmealPageQueryDTO setmealPageQueryDTO);

    @AutoFill(OperationType.INSERT)
    void insert(Setmeal setmeal);

    @AutoFill(OperationType.UPDATE)
    void update(Setmeal setmeal);

    void deleteByIds(List<Long> ids);

    Integer countByStatus(Integer status);
}
